#pragma once

#include "cpu.h"
#include "ppu.h"
#include "connector.h"
#include "common.h"

class nes
{
public:
	nes( CPU2A03* c, PPU2C02 * p, const char *file );
	~nes(void);

public:
	void			Reset();

private:
	BYTE			mapper;
	unsigned int	data_start_addr;
	CPU2A03*		m_pCPU;
	PPU2C02*		m_pPPU;
	connector		conn;

private:
	void			Initial( CPU2A03* c,PPU2C02 *p);
	void			SeekAndRead( char *buf );
	void			MapCPUMem();
	void			MapPPUMem();
};

